php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#230005 - 12/26/02 06:38 AM [6.2] Custom Title 2.2
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Mod Name / Version - Custom Title 2.2<br />     ver 2.0 Updates to work with ver 6.2 and adds the ability to let only a specific user group change their titles.<br />     ver 2.1 Adds a check to make sure the user doesn't leave the title blank.<br />     ver 2.2 Fixes a bug where the title was getting lost on users who weren't part of the special user group. (Thanks to Leo at leoville.com for pointing out this bug. <img src="/forum/images/graemlins/wink.gif" alt="" /> )<br /><br />Description - Gives Users of a specific usergroup the ability to change their own titles.<br /><br />Pre-requisites - none<br /><br />Author - JoshPet - www.joshuapettit.com<br />     for discussions and bug reports come to www.threadsdev.com<br /><br />Credits - WrAith created version 1.0. I updated for ver. 6.2, and Storm suggested the User Group restriction.<br /><br />Files Altered - editbasic.php, changebasic.php, editbasic.tmpl, /languages/english/editbasic.php, /languages/english/changebasic.php<br /><br />Database Altered - no <br /><br />New Files - none<br /><br />Any other info - The main Credits Goes to WrAith. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br /><br />If you don't know the group ID Number...<br />you can run this SQL Query from the Admin Menu.<br /><br />SELECT G_Id, G_Name<br />FROM w3t_Groups<br />


Attachments
62534-CustomTitle2.2.txt (153 downloads)



Edited by JoshPet (12/30/02 12:41 AM)
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230006 - 12/29/02 12:15 PM Re: [6.2] Custom Title 2.1 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Updated the attachment to version 2.1<br /><br />Version 2.1 adds a check to make sure the title isn't left blank.<br /><br />If you've already installed version 2.0, here's how you can make the change:<br /><br /><pre><font class="small">code:</font><hr><br />##<br />## In your modified changebasic.php file<br />##<br /><br />#<br /># Find this:<br />#<br /><br />// --------------------------------------------------<br />// If title is greater than 100 then we can't proceed<br /> if ( strlen($Title) > 100 ) {<br /> $html -> not_right($ubbt_lang['TITLE_TOO_LONG'],$Cat); <br /> }<br /><br /><br />#<br /># Change to this:<br />#<br /><br />// --------------------------------------------------<br />// If title is greater than 100 or blank then we can't proceed<br /> if (( strlen($Title) > 100 ) || (!$Title)) {<br /> $html -> not_right($ubbt_lang['TITLE_TOO_LONG'],$Cat); <br /> }<br /><br /><br />##<br />## In the modified /languages/english/changebasic.php file<br />##<br /><br />#<br /># Find this:<br />#<br /><br />$ubbt_lang['TITLE_TOO_LONG'] = "Title too long.";<br /><br /><br /><br />#<br /># Change to this:<br />#<br /><br />$ubbt_lang['TITLE_TOO_LONG'] = "Your Title is either too long, or blank.";<br /></pre><hr>
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230007 - 12/29/02 12:40 PM Re: [6.2] Custom Title 2.2 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Ok - last update for a bit.<br /><br />Just updated to version 2.2.<br /><br />    ver 2.2 Fixes a bug where the title was getting lost on users who weren't part of the special user group. (Thanks to Leo at leoville.com for pointing out this bug.  )<br /><br /><pre><font class="small">code:</font><hr><br />If you already installed, in your modified editbasic.php find this:<br /><br /> else {<br /> $CustomTitle = "";<br /> }<br /><br /><br />Change to this:<br /><br /> else {<br /> $CustomTitle = "<input type =\"hidden\" name = \"Title\" value = \"$UserTitle\" />";<br /> }<br /></pre><hr>
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230008 - 12/30/02 12:23 AM Re: [6.2] Custom Title 2.2 [Re: Daine]
WrĊith Offline
Enthusiast

Registered: 01/31/02
Posts: 310
Loc: California, USA
Hey, cool! I'm glad someone finally got around to doing this. Unfortunately, I don't have a copy of 6.2 so I couldn't do anything with it. Eventually when I get some cash I'll purchase the latest version.<br /><br />Thanks for taking care of this. <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#230009 - 12/30/02 12:39 AM Re: [6.2] Custom Title 2.2 [Re: SDS]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
No prob. My users are loving it.... as are some users at Leoville. <br />I think Storm is using it as well.<br /><br />Thanks for getting it started. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230010 - 12/30/02 05:58 PM Re: [6.2] Custom Title 2.2 [Re: Daine]
Storm_dup1 Offline
Member

Registered: 08/03/02
Posts: 263
Loc: Somewhere above Texas
I was using it...... Gotta still add it to 6.2 so it'll work with the birthday hack.... Right now I'm choosing b-day until I get the energy to add it.......hehe <img src="/forum/images/graemlins/laugh.gif" alt="" /> Great hack though..... <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Some people read their stars..... I choose to write my own

Top
#230011 - 01/21/03 06:57 PM Integrating Custom Title hack with BDay Hack [Re: ]
Mudpuppy Offline
Journeyman

Registered: 08/16/02
Posts: 113
Loc: Sin City
I added the BDay hack to my 6.2 board and it works fine. I edited out the display for the year of birth, as some of my members are shy about their ages.<br /><br />I'm now trying to add the Custom User Title hack, which uses some of the files I already hacked in the Birthday feature. I can't seem to get Custom Titles working properly.<br /><br />-- at no point after I installed the hack did I ever see a "Custom Title" box in my profile. However, if I tried to submit other changes to my profile, I'd get a "We can't proceed; title too long or blank" error message. <br /><br />-- I wasn't exactly clear on how to substitute the group number in editbasic.php. Am I to replace -5- with just 3 (for example), or do I replace it with -3- ?<br /><br />-- in places where the BDay Hack and the Custom Title hack both affect the same area of code, which hack snippet goes first?<br /><br />Thanks... hopefully it's nothing too complicated.

Top
#230012 - 01/21/03 09:45 PM Re: Integrating Custom Title hack with BDay Hack [Re: jbiz]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
First - list the group number like this -3- with the dashes. That's how it can tell 3 apart from 30. <br /><br />As per areas that are affected by the two hacks....<br /><br />Basically the <br /><br />SELECT U_LoginName,U_Password,U_Email.......<br /><br />line as well as the <br /><br />list($LoginName,$ChosenPassword,$Email....<br /><br />line<br /><br />If those lines have already been modified from another hack... be sure to add the fields to the end of each line... rather than replacing the whole line.<br /><br />so at the end of the SELECT line, you'll add: U_Groups and at the end of the list line, you'll add: $Groups. That way the Birthday fields and variables for the other mod remain intact. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230013 - 01/22/03 01:30 AM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
Mudpuppy Offline
Journeyman

Registered: 08/16/02
Posts: 113
Loc: Sin City
I did it, it works! As always, you're a genius -- and you've been a genius twice today!

Top
#230014 - 01/22/03 11:17 AM Re: Integrating Custom Title hack with BDay Hack [Re: jbiz]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
<img src="/forum/images/graemlins/grin.gif" alt="" /><br /><br />That made my day. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230015 - 01/23/03 08:17 PM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
I have a quick question...<br /><br />what if you want to allow multiple groups the ability to alter their titles? For example I have 4 different groups I'd like to allow custom titles for. But not sure how to make this happen <img src="/forum/images/graemlins/frown.gif" alt="" />

Top
#230016 - 01/23/03 09:44 PM Re: Integrating Custom Title hack with BDay Hack [Re: palmen]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I think this will do it:<br /><br /><br /> if ((preg_match("/-5-/",$Groups)) || (preg_match("/-6-/",$Groups)) || (preg_match("/-7-/",$Groups))) { <br /><br /><br />I haven't tested... but the || means OR, so list them with the || between them.... then put a ( at the begining and another ) at the end.<br /><br />Let me know if that works for you. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230017 - 01/23/03 09:54 PM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
Dave_L_dup1 Offline
Addict

Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
This is more efficient:<br /><br />if (strstr($Groups,'-5-') or strstr($Groups,'-6-') or strstr($Groups,'-7')) {
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.

Top
#230018 - 01/23/03 09:56 PM Re: Integrating Custom Title hack with BDay Hack [Re: joeuser]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Thanks Eagle Eye! <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230019 - 01/23/03 11:12 PM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Hmm, ok, I have a problem. Even before I added the multiple groups addition, everyone on the site is receiving this error when trying to update their profile:<br /><br />[]Your Title is either too long, or blank. [/]<br /><br />I thought adding the multiple groups thing would maybe eliminate this, but alas it did not. So as of right now, nobody can update their profile as it gives them that error. Any ideas?

Top
#230020 - 01/23/03 11:21 PM Re: Integrating Custom Title hack with BDay Hack [Re: palmen]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
hmm, I think it is your birthday hack conflicting with your custom title hack. I applied the title hack first, THEN the birthday hack... but then went back and looked and saw a lot of the group hack stuff has been overwritten by the birthday hack <img src="/forum/images/graemlins/frown.gif" alt="" /> So no neither work *cry*

Top
#230021 - 01/24/03 12:10 AM Re: Integrating Custom Title hack with BDay Hack [Re: palmen]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Check the variables... and make sure that you did all the steps. It would seem that changebasic isn't getting the variable from edit basic.<br /><br />If all that is fine try adding this near the other get input lines in the changebasic.php file:<br /><br /> $Title = get_input("Title","post");<br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230022 - 01/24/03 01:02 AM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Add the stuff into the SELECT and list lines... don't copy and paste over those lines if you are doing more than one hack.... you have to add the Birtgday fields to the end of those lines....leaving the Title field in there as well.<br /><br />If you overwrite the title field, and it's not in there being pulled from the DB then it is blank. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />See my post above. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#230023 - 01/24/03 10:50 AM Re: Integrating Custom Title hack with BDay Hack [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Thanks Josh, that was the problem. In the SELECT lines the title and groups variable was gone Everything seems well now <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#230024 - 01/28/03 10:51 AM Re: Integrating Custom Title hack with BDay Hack [Re: palmen]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
I just want to say thanks again. This hack has been by FAR the biggest revenue generator of all time! I announced that donating members receive the ability to make a custom title. Well, once people started seeing the fun titles were coming up with everyone was like "HEY! I want a custom title too!" So in the past few days, my paypal account has had over 200 dollars in donations!!!<br /><br />I thought giving them 20 megs of photo storage was enough, but what they really wanted was the custom titles <img src="/forum/images/graemlins/laugh.gif" alt="" /> All I know is if this keeps up I will have the server completely paid for before spring <img src="/forum/images/graemlins/wink.gif" alt="" />

Top
Page 1 of 2 1 2 >



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks